<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserAddr extends Model
{

    protected $guarded = [];

    public function user()
    {
        return $this->belongsTo(User::class);
    }
    protected $dates = ['last_used_at'];

    public function getFullAddressAttribute()
    {
        return "{$this->province}-{$this->city}-{$this->street}";
    }
    public function getAllAddressAttribute()
    {
        return "{$this->province}-{$this->city}-{$this->street}-{$this->detail}";
    }
}
